<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var n1=0;
    setTimeout(f1,1000);
function f1() {
    n1++;
    console.log(n1);
    setTimeout(f1,1000)
}
</script>

</body>
</html>